home *** CD-ROM | disk | FTP | other *** search
/ Champak 141 / (Vol 141) Oct 17 2011.iso / Games / flight-of-the-museum.swf / scripts / engine / levelData / Level_06.as < prev    next >
Encoding:
Text File  |  2011-10-17  |  1.8 KB  |  63 lines

  1. package engine.levelData
  2. {
  3.    import copy.CopyBank;
  4.    import engine.WorldScene;
  5.    import engine.dynamicObjects.*;
  6.    
  7.    public class Level_06 extends LevelData
  8.    {
  9.        
  10.       
  11.       public function Level_06()
  12.       {
  13.          super();
  14.          _goalParameters = new Array();
  15.       }
  16.       
  17.       override public function buildLevel() : *
  18.       {
  19.          var i:* = undefined;
  20.          var fuelIcon:* = undefined;
  21.          var goalObj:Object = null;
  22.          var missionObj:Object = null;
  23.          var ring:* = undefined;
  24.          super.buildLevel();
  25.          for(i = 0; i < 12; i++)
  26.          {
  27.             ring = new GoalRing();
  28.             ring.x = 800 + i * 200;
  29.             ring.y = 600 + Math.sin(-i) * 50;
  30.             ring.rOffset = i * 0.25;
  31.             ring.SinAmp = 0.08;
  32.             WorldScene.Instance.GameplayObjects.push(ring);
  33.          }
  34.          fuelIcon = new FuelIcon();
  35.          fuelIcon.x = 3000;
  36.          fuelIcon.y = 600;
  37.          WorldScene.Instance.GameplayObjects.push(fuelIcon);
  38.          fuelIcon = new FuelIcon();
  39.          fuelIcon.x = 1500;
  40.          fuelIcon.y = 600;
  41.          WorldScene.Instance.GameplayObjects.push(fuelIcon);
  42.          _missionDescription = CopyBank.Instance.MissionDesc_Rings;
  43.          goalObj = {
  44.             "Type":"Ring",
  45.             "Count":12
  46.          };
  47.          _goalParameters.push(goalObj);
  48.          missionObj = {
  49.             "Description":_missionDescription,
  50.             "BoundsX":_missionBoundsX,
  51.             "BoundsHint":_missionBoundsHint,
  52.             "GoalParamaters":_goalParameters,
  53.             "PrimaryGoalType":"Rings",
  54.             "StartLoc":{
  55.                "x":50,
  56.                "y":850
  57.             }
  58.          };
  59.          WorldScene.Instance.setMissionDetails(missionObj);
  60.       }
  61.    }
  62. }
  63.